package com.yaoge.service.impl;

import com.yaoge.dao.StudentDao;
import com.yaoge.domain.Student;
import com.yaoge.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao;

    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public void selectAll() {
        List<Student> studentList=studentDao.selectStudentAll();
        for (Student student:studentList
             ) {
            System.out.println("-----------"+student);
        }
        System.out.println("进行了selectALL的操作");
    }

    @Override
    public void insert(Student student) {
        int count=studentDao.insertStudent(student);
        System.out.println("插入"+count+"行");
    }
}
